<template>
    <div class="cinema-detail-header-container">
        <nut-cell>
            <div class="content">
                <div class="left" v-if="currentCinemaInfo">
                    <div class="title">{{ currentCinemaInfo?.cinemaName }}</div>
                    <div class="desc">
                        <!-- 河北省石家庄市桥西区海悦天地 -->
                        {{ currentCinemaInfo?.cinemaAddress }}
                    </div>
                </div>
                <div class="right">
                    <div class="icon">
                        <Location2 color="#858a99" size="0.6rem"></Location2>
                    </div>
                    <div class="distance">
                        {{ currentCinemaInfo?.city }}
                    </div>
                </div>
            </div>
        </nut-cell>
    </div>
</template>
<script lang="ts" setup>
import { Location2 } from "@nutui/icons-vue-taro";
import { toRefs } from "vue";
import { storeToRefs } from 'pinia';
import { useLocationStore } from '../../store';
const locationStore = useLocationStore();
const { getSelectCityinfo } = storeToRefs(locationStore);

//接收父组件的props
const props = defineProps({
    //子组件接收父组件传递过来的值
    info: Object,
    list: Array,
    currentCinemaInfo: Object
});
//使用父组件传递过来的值
const { info, list, currentCinemaInfo } = toRefs(props);
</script>
<style lang="scss">
.cinema-detail-header-container {
    display: flex;
    flex-direction: column;
    margin: 0 25px;

    .content {
        display: flex;
        flex-direction: row;
        height: 100px;
        width: 100%;

        .left {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            margin-right: 35px;

            .title {
                font-weight: 500;
                color: #15181d;
                font-size: 28px;
            }

            .desc {
                color: #858a99;
                font-size: 24px;
                margin-top: 10px;
            }

            .title,
            .desc {
                display: -webkit-box;
                /* autoprefixer: ignore next */
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 1;
                text-overflow: ellipsis;
                overflow: hidden;
            }
        }

        .right {
            display: flex;
            flex-direction: row;
            align-items: center;

            .icon {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                margin-right: 10px;
            }

            .distance {
                color: #858a99;
                font-size: 24px;

                .nut-price {
                    color: #858a99;
                }
            }
        }
    }
}
</style>
